package buber.util;

public class MathUtils {
	public static int random(int range){
		return (int)( Math.random()*(double)range);
	}
	public static int random(int min,int max){
		int range = Math.abs(max-min);
		
		return (int)( Math.random()*(double)range)+min;
	}
	public static int random(){
		return (int) Math.round(Math.random());
	}
	public static boolean mutateWithProb(double prob){
		double t = Math.random();
		if(t<prob){
			return true;
		}else{
			return false;
		}
	}
}
